function [ f ] = plotVariability( data1, description1, data2, description2, electrodeLabels, frequenciesOfInterest )
%PLOTVARIABILITY Plot the variability of the channels that are
%  used to create the responsiveness plot

numberOfChannels = length(electrodeLabels);

f = figure('PaperOrientation','landscape','Colormap',[1 1 1;1 1 0.8;1 1 0.6;1 1 0.4;1 1 0.2;1 1 0;1 0.9167 0;1 0.8333 0;1 0.75 0;1 0.6667 0;1 0.5833 0;1 0.5 0;1 0.4167 0;1 0.3333 0;1 0.25 0;1 0.1667 0;1 0.08333 0;1 0 0;0.9783 0 0;0.9565 0 0;0.9348 0 0;0.913 0 0;0.8913 0 0;0.8696 0 0;0.8478 0 0;0.8261 0 0;0.8043 0 0;0.7826 0 0;0.7609 0 0;0.7391 0 0;0.7174 0 0;0.6957 0 0;0.6739 0 0;0.6522 0 0;0.6304 0 0;0.6087 0 0;0.587 0 0;0.5652 0 0;0.5435 0 0;0.5217 0 0;0.5 0 0;0.4783 0 0;0.4565 0 0;0.4348 0 0;0.413 0 0;0.3913 0 0;0.3696 0 0;0.3478 0 0;0.3261 0 0;0.3043 0 0;0.2826 0 0;0.2609 0 0;0.2391 0 0;0.2174 0 0;0.1957 0 0;0.1739 0 0;0.1522 0 0;0.1304 0 0;0.1087 0 0;0.08696 0 0;0.06522 0 0;0.04348 0 0;0.02174 0 0;0 0 0]);
cLimits = [ min([min(data1(:)) min(data2(:))]) max([max(data1(:)) max(data2(:))]) ];

axes1 = subplot(2,1,1, 'Parent', f, 'FontSize', 5, 'CLim', cLimits, ...
    'XTickLabel', electrodeLabels, 'XTick', 1:numberOfChannels);
xlim(axes1, [1 numberOfChannels]);
ylim(axes1, [min(frequenciesOfInterest) max(frequenciesOfInterest)]);
hold(axes1,'all');
title(description1, 'FontSize',12);
% xlabel('Electrode');
ylabel('Frequency');
image(1:numberOfChannels, frequenciesOfInterest, data1,'Parent',axes1, 'CDataMapping','scaled');
colorbar('peer', axes1);
xticklabel_rotate([], 90, electrodeLabels);


axes1 = subplot(2,1,2, 'Parent', f, 'FontSize', 5, 'CLim', cLimits, ...
    'XTickLabel', electrodeLabels, 'XTick', 1:numberOfChannels);
xlim(axes1, [1 numberOfChannels]);
ylim(axes1, [min(frequenciesOfInterest) max(frequenciesOfInterest)]);
hold(axes1,'all');
title(description2, 'FontSize',12);
% xlabel('Electrode');
ylabel('Frequency');
image(1:numberOfChannels, frequenciesOfInterest, data2,'Parent',axes1, 'CDataMapping','scaled');
colorbar('peer', axes1);
xticklabel_rotate([], 90, electrodeLabels);

end

